package com.example.csdn.pojo;

import com.example.csdn.anno.Status;
import com.example.csdn.anno.UserIdentity;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.hibernate.validator.constraints.URL;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class User {

    private Integer id;//id

    @NotEmpty
    private String username;//用户名
    private String password;//密码

    @Email
    private String email;//邮箱

    @URL
    private String avatar;//头像

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;//创建时间

    @UserIdentity
    private String identity;//身份

    private String userDes;//描述

    @Status
    private String status;//状态
}
